builder: Minor tweak
authorMatthias Clasen <mclasen@redhat.com>
Wed, 9 Sep 2015 20:52:11 +0000 (16:52 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 12 Sep 2015 15:24:36 +0000 (11:24 -0400)
gtk/gtkbuilder.c

index 1bf770f760fba12d06aec3e6ca0dff6c157cf7bd..1941aac820d27f2f09938c4309fb1baee10797a7 100644 (file)
@@ -2274,10 +2274,16 @@ _gtk_builder_boolean_from_string (const gchar  *string,
     goto error;
   else if (string[1] == '\0')
     {
-      gchar c = g_ascii_tolower (string[0]);
-      if (c == 'y' || c == 't' || c == '1')
+      gchar c;
+
+      c = string[0];
+      if (c == '1' ||
+          c == 'y' || c == 't' ||
+          c == 'Y' || c == 'T')
         *value = TRUE;
-      else if (c == 'n' || c == 'f' || c == '0')
+      else if (c == '0' ||
+               c == 'n' || c == 'f' ||
+               c == 'N' || c == 'F')
         *value = FALSE;
       else
         goto error;